Skip to content

feat: expose model_version in responses for humanitarian, anonymize, and ocr schemas#374

Merged
kilodesodiq-arch merged 2 commits into
ChainForgee:mainfrom
Opulencechuks:main
Jul 19, 2026
Merged

feat: expose model_version in responses for humanitarian, anonymize, and ocr schemas#374
kilodesodiq-arch merged 2 commits into
ChainForgee:mainfrom
Opulencechuks:main

Conversation

@Opulencechuks

Copy link
Copy Markdown
Contributor

Closes #272
Summary

This PR exposes the model_version in the response payloads for the Humanitarian verification, PII anonymization, and OCR endpoints. Prior to this change, consumers of these APIs could not determine which model version (e.g. gpt-4o-mini or llama-3.3-70b-versatile) processed their request.

model_version is resolved dynamically at runtime from settings (settings.openai_model or settings.groq_model) based on the active or resolved provider.

Testing

The changes were verified using both schema-level unit tests and route integration tests.

Tests Run

We added new snapshot tests to pin the model_version field in the expected output structure, and updated the integration test assertions to verify the value returned on the endpoints.

# To run the test suite locally once the Python environment is set up:
pytest

Screenshots

N/A (API changes only)

Checklist

  • Tests added or updated for new/changed behavior
  • Existing tests pass
  • No secrets, keys, or seed phrases committed
  • Follows the coding conventions in the relevant service README
  • PR is focused on a single concern

Copy link
Copy Markdown
Contributor

Awesome work on this! Thanks for the contribution 🚀 Merging now.

Copy link
Copy Markdown
Contributor

Hi 👋 Thanks for this PR! There are some merge conflicts with the current main. Could you rebase onto main and push when you have a moment? Once it's clean we'll get it merged 🚀

@kilodesodiq-arch kilodesodiq-arch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kilodesodiq-arch
kilodesodiq-arch merged commit 36d93fb into ChainForgee:main Jul 19, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a model_version field to all AI responses

2 participants